﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Common;

namespace 生命体征测试仪
{
    public partial class formOffline : formBase
    {
        public formOffline()
        {
            InitializeComponent();
        }

        private void skinButton3_Click(object sender, EventArgs e)
        {
            listView1.Items.Clear();
            TEPartList ret = WebWork.QueryOffline(formMain.curUser.ID);
            if (ret == null || ret.message != "ok")
            {
                MessageBox.Show("查询失败");
                return;
            }
            if (ret.list == null)
                return;
            for (int i = 0; i < ret.list.Count; i++)
            {
                ListViewItem li = listView1.Items.Add((i + 1).ToString());
                TEInfoPart te=ret.list[i];
                li.SubItems.Add(te.zhuCeID);
                li.SubItems.Add(te.shiyongdanwei);
                li.SubItems.Add(te.bufangweizhi);
                if (te.LastPulse.IndexOf("1997") != -1)
                    li.SubItems.Add("无");
                else
                    li.SubItems.Add(te.LastPulse);
            }
        }

        private void formOffline_Load(object sender, EventArgs e)
        {
            skinButton3_Click(null, null);
        }

        private void skinButton1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
